package com.guigu.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.guigu.pojo.EvaluateDetail;
import com.guigu.service.EvaluateDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin
@RestController
@RequestMapping("evaluate")
public class EvaluateDetailController {

    @Autowired
    EvaluateDetailService evaluateService;

    //分页及所有
    @GetMapping("evaluate.action")
    public Page<EvaluateDetail> queryPageEvaluates(
            EvaluateDetail evaluate,
            @RequestParam(value = "pageno", defaultValue = "1") Integer pageno,
            @RequestParam(value = "pagesize", defaultValue = "5") Integer pagesize){
        return  evaluateService.queryPageEvaluates(evaluate,pageno,pagesize);
    }
}
